package pers.duorhs.common.socket.service;

import pers.duorhs.common.socket.SocketData;

/**
 * @author Duorhs
 * @date 2022/5/9 9:31
 */
public interface CsrSocketService {
    /**
     * 坐席登录
     *
     * @param employee
     */
    void employeeLogin(String employee);

    /**
     * 坐席开始工作
     *
     * @param customer
     * @param employee
     */
    void employeeWork(String customer, String employee);

    /**
     * 解除工作关系
     *
     * @param customer
     */
    void workDone(String customer);

    /**
     * 坐席登出
     *
     * @param employee
     */
    void employeeLogout(String employee);

    /**
     * 给坐席的socket客户端推送消息
     *
     * @param data
     */
    void pushToCsrClient(SocketData data);

    boolean myEmployeeClient(String room, String name);

    /**
     * 有新用户开始排队
     */
    void checkQueue();

    /**
     * 根据客户找到关联的坐席
     *
     * @param customer
     * @return
     */
    String findEmployeeByCustomer(String customer);

    /**
     * 坐席给APP推信息(模拟前端的socket发请求)
     *
     * @param employee
     * @param msg
     */
    void push(String employee, String msg);
}
